﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Mysoft.MyCM.Web.Controllers;
using M;
using M.Web;

namespace Mysoft.MyCM.Web.Areas.Service.Controllers
{
	public class CustomServiceController : MAjaxBaseController
	{
		[HttpPost]
		public JsonResult Qurey(string keyword)
		{
			Business.Scm.CustomBLL bll = new Business.Scm.CustomBLL();
			return GetJsonResult(true, bll.QueryCustoms(keyword));
		}

		[HttpPost]
		public JsonResult GetVisitHistory(int top)
		{
			Business.Scm.VisitBLL bll = new Business.Scm.VisitBLL();
			return GetJsonResult(true, bll.GetVisitHistory(this.RequestParam.LogonUser.Code, top));
		}

		[HttpPost]
		public JsonResult RemoveVisitHistory(Guid visitId)
		{
			Business.Scm.VisitBLL bll = new Business.Scm.VisitBLL();
			bll.RemoveVisitHistory(visitId);
			return GetJsonResult(true, "");
		}
	}
}